package com.atguigu2.two.exer1;

/**
 * ClassName: arrary_sum
 * Description:
 *
 * @Author liu
 * @Create 2024/8/11 11:04
 * @Version 1.0
 */

public class arrary_sum {
   public static void main(String[] args) {
       int[][] arr = new int[][]{{3,5,8},{12,9},{7,0,6,4}};
       int sum = 0;
       for (int i = 0; i < arr.length ; i++) {
           for(int j = 0;j < arr[i].length;j++ ){
               sum += arr[i][j];
           }

       }
       System.out.println("数组中所有元素的和为：" + sum);
   }
}
